package com.china.api.wechat.processor.main;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;

public class Session  implements Serializable{

	private static final long serialVersionUID = 1L;
	private String userId;
	
	
	/**
	 * 非字符串数据请自行序列化，可以使用SerializeUtil.serializeJson()工具
	 */
	private Map<String, String> dataMap = new HashMap<String,String>();

	private Stack<HistoryFrame> history = new Stack<HistoryFrame>();
	
	public Session(String userId){
		this.userId = userId;
	}
	
	public void clear(){
		dataMap.clear();
		history.clear();
	}
	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Map<String, String> getDataMap() {
		return dataMap;
	}

	public void setDataMap(Map<String, String> dataMap) {
		this.dataMap = dataMap;
	}

	public Stack<HistoryFrame> getHistory() {
		return history;
	}

	public void setHistory(Stack<HistoryFrame> history) {
		this.history = history;
	}
	
}
